function initTable() {
    ajaxCall("POST",path+"/SelfExamTransactionServlet?method=getTable",setTable);
}
function setTable(res) {
    var obj=JSON.parse(res);
    var table=document.getElementById("myTable");
    for(var i in obj){
        var newRow=table.insertRow(1);
        var date=newRow.insertCell(0);
        var question=newRow.insertCell(1);
        var onclick=newRow.insertCell(2);

        date.innerHTML=obj[i].date;
        question.innerHTML=obj[i].questionContent;
        onclick.innerHTML="<input type='button' value='详情' onclick='details("+obj[i].examId+")'/>"

    }

}
function details(examId) {
    window.location.href="myCodeDetail.jsp?examId="+examId;
}
